package com.zx.rbac.oms.controller;

import java.util.List;

import com.zx.rbac.common.api.CommonPage;
import com.zx.rbac.common.api.Result;
import com.zx.rbac.oms.dto.OmsOrderDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.zx.rbac.oms.model.OmsOrderEntity;
import com.zx.rbac.oms.service.OmsOrderService;



/**
 * 订单表
 *
 * @author Qin
 * @email xiao_zhi_2020@163.com
 * @date 2021-08-06 22:07:13
 */
@RestController
@RequestMapping("rbacApi/omsorder")
public class OmsOrderController {

    @Autowired
    private OmsOrderService omsOrderService;

    /**
     * 列表
     */
    @RequestMapping("/list")
    //@Permissions("rbacApi:omsorder:list")
    public Result<CommonPage<OmsOrderDto>> list(@RequestBody OmsOrderEntity omsOrderEntity,
                                       @RequestParam Integer pageNum,
                                       @RequestParam Integer pageSize
                                       ){
        List<OmsOrderDto> omsOrderDtoList = omsOrderService.queryPage(omsOrderEntity,pageNum,pageSize);
        return Result.success(CommonPage.restPage(omsOrderDtoList));
    }


    /**
     * 信息
     */
    @RequestMapping("/info/{id}")
    //@RequiresPermissions("rbacApi:omsorder:info")
    public Result info(@PathVariable("id") Long id){
        return Result.success();
    }

    /**
     * 保存
     */
    @RequestMapping("/save")
    //@RequiresPermissions("rbacApi:omsorder:save")
    public Result save(@RequestBody OmsOrderEntity omsOrder){
        return Result.success();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    //@RequiresPermissions("rbacApi:omsorder:update")
    public Result update(@RequestBody OmsOrderEntity omsOrder){
        return Result.success();
    }

    /**
     * 删除
     */
    @RequestMapping("/delete")
    //@RequiresPermissions("rbacApi:omsorder:delete")
    public Result delete(@RequestBody Long[] ids){
        return Result.success();
    }

}
